package com.yq.day22._01string;




/**
 * @author 3307235355@qq.com
 * @since 2022/06/22 14:07
 */
public class Deo02 {
    public static void main(String[] args) {
        //    字符串 第一个字母大写，后字母小写
        String s = "helloWorld";
        String start = s.substring(0, 1);
        String s1 = start.toUpperCase();
        String end = s.substring(1);
        String s2 = end.toLowerCase();
        s = s1 + s2;
        System.out.println(s);
    //    字符串的反转
        String d1 = "abc";
        String result="";
        for (int i = d1.length()-1; i >=0; i--) {
            char c = d1.charAt(i);
            result += c;
        }
        System.out.println(result);

        // trim 去掉开头和结尾的空格
        String g1 = " ab3  ";
        String t1 = g1.trim();
        System.out.println(t1);

        System.out.println(g1.length());


    }
}
